<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">域名等级:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[dns_type]" id="c-dns_type" data-rule="required" class="form-control selectpicker">
                <option value="0" selected >一级域名</option>
                <!--<option value="1" >二级域名</option>-->
            </select>
        </div>
    </div>
    <div class="form-group" id="hide_dns_name">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" name="row[name]" type="text" value="" placeholder="请输入一级域名，例如aliyun.com">
        </div>
    </div>
    <div class="form-group" id="hide_dns_name2" style="hidden;display: none;">
        <label class="control-label col-xs-12 col-sm-2">主机记录</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[name2]" type="text" value="" placeholder="请输入二级域名，例如www" onKeyUp="value=value.replace(/[\W]/g,'')">
            <div class="" style="padding-left: 5px; padding-right: 5px;margin-top: 10px;overflow: hidden;">
                <i aria-label="图标: question-circle-o" class="anticon anticon-question-circle-o _2wLtsf1H" style="float: left;width: 5%;">
                    <svg viewBox="64 64 896 896" focusable="false" class="" data-icon="question-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"></path></svg>
                </i>
                <p style="width: 95%;">主机记录就是域名前缀，常见用法有：
                    <br/>
                    www：解析后的域名为www.aliyun.com。
                    <!--<br/>-->
                    <!--@：直接解析主域名 aliyun.com。-->
                    <!--<br/>-->
                    <!--*：泛解析，匹配其他所有域名 *.aliyun.com。-->
                    <br/>
                    mail：将域名解析为mail.aliyun.com，通常用于解析邮箱服务器。
                    <br/>
                    二级域名：如：abc.aliyun.com，填写abc。
                    <br/>
                    手机网站：如：m.aliyun.com，填写m。
                    <!--<br/>-->
                    <!--显性URL：不支持泛解析（泛解析：将所有子域名解析到同一地址）-->
                </p>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Info')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-info" class="form-control" name="row[info]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('标签')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="checkbox">
                {foreach name="dnslabel_list" item="vo"}
                <label for="row[label][]-{$key}"><input id="row[label][]-{$key}" name="row[label][]" type="checkbox" value="{$vo}" /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
